﻿@model Mulala.Cavan.Presentation.Mvc.ViewModel.ICorporationNewViewModel
@{
    ViewBag.Title = " 公司新闻";
    Layout = "~/Views/Shared/_CorporationCenterLayout.cshtml";
}
@section header{
    <title>@ViewBag.Title</title>
}
@using (Html.BeginForm())
{
    <div>
        @Html.ValidationSummary()
        <fieldset>
            <legend>Registration Form</legend>
            <ol>
                <li>
                    @Html.LabelFor(m => m.Item.Title)
                    @Html.TextBoxFor(m => m.Item.Title, new { id = "Title" })
                </li>
                <li>
                    @Html.LabelFor(m => m.Item.Content)
                    @Html.TextBoxFor(m => m.Item.Content, new { id = "Content" })
                </li>
            </ol>
            <input type="submit" value="保存" id="submit" />
        </fieldset>
    </div>
}

<script type="text/javascript">
    $(function () {
        $("form[action$='保存']").submit(function () {

            $.post($(this).attr("action"), $(this).serialize(), function (response) {
                alert(response.Messages[0]);
            });

            return false;
        });
    })
</script>
